// 流程日志
var processlog = Vue.extend({
	template:'<div class="process-log-box"><div v-if="proscessLogList.length == 0" class="nodata-tips">暂无数据</div><div class="process-log" v-for="(item,inde) in proscessLogList"><div class="process-log-time">节点描述：{{item.node_name}}</div><div class="process-log-res" v-if="item.status == 0">处理时间：{{item.node_deal_time}}</div><div class="process-log-res" v-if="item.status == 1">处理时间：--</div><div class="process-log-res">处理人：{{item.node_deal_staff_name}}</div><div class="process-log-res">处理意见：<span v-if="inde != proscessLogList.length-1">{{item.approve_desc}}</span></div></div></div>',
	data () {
		return {
			proscessLogList:[]
		}
	},
	props : {
		processlogid : [String,Number],
	},
	mounted () {
		this.queryProcessLogData ()
	},
	methods: {
		// 查询
		queryProcessLogData () {
			let param = {
				workId : this.processlogid
			}
			let _this = this
			mui.neiosRequst.httpRequst('/app/personWork/getNodeLogByWorkId', param,
				function(data) {
					console.log("流程审批日志==========",JSON.stringify(data))
					if (data.code == '0') {
						if (data.data == null || data.data == undefined || data.data == '') {
							_this.proscessLogList = []
						} else {
							_this.proscessLogList = data.data
						}
					} else {
						_this.proscessLogList = []
						mui.toast('请稍后重试！')
					}
				},
				function() {
					_this.proscessLogList = []
					mui.toast('请稍后重试！')
				},'0'
			);
		},
		// 转换日期格式
		dateFormate (date) {
			return mui.neiosCommon.transTime(new Date(date))
		}
	}
})
